/*
 * Created on 05-jun-06
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package org.jma.lib.soap.sessions;

import java.util.HashMap;

import org.jma.lib.utils.multithreading.Mutex;


/**
 * @author jesus
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class SOAPSession extends HashMap  {
	private String id=null;
	private String userName=null;
	private String password=null;
	private String InetAddress;
	/**
	 * @return the inetAddress
	 */
	public String getInetAddress() {
		return InetAddress;
	}
	/**
	 * @param inetAddress the inetAddress to set
	 */
	public void setInetAddress(String inetAddress) {
		InetAddress = inetAddress;
	}

	private long initiationTime=0;
	private int timeout=-1;

	
	
	/**
	 * @return the initiationTime
	 */
	public long getInitiationTime() {
		return initiationTime;
	}
	/**
	 * @param initiationTime the initiationTime to set
	 */
	public void setInitiationTime(long initiationTime) {
		this.initiationTime = initiationTime;
	} 
	/**
	 * @return
	 */

	
	public SOAPSession(){
		super();
		initiationTime	=System.currentTimeMillis();
	}
	
	
	public String getId() {
		return id;
	}

	/**
	 * @param string
	 */
	public void setId(String string) {
		id = string;
	}

	/**
	 * @return
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @return
	 */
	public int getTimeout() {
		return timeout;
	}

	/**
	 * @return
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * @param string
	 */
	public void setPassword(String string) {
		password = string;
	}

	/**
	 * @param i
	 */
	public void setTimeout(int i) {
		timeout = i;
	}

	/**
	 * @param string
	 */
	public void setUserName(String string) {
		userName = string;
	}


	public String toString(){
		return userName+":"+InetAddress+":"+initiationTime	;
	}
	

}
